[TRTLLM-11875][feat] Support fine-grained context chunk management - #16427
Conversation
|
/bot run |
|
PR_Github #59453 [ run ] triggered by Bot. Commit: |
|
PR_Github #59453 [ run ] completed with state
|
VALLIS-NERIA
left a comment
There was a problem hiding this comment.
Author notes explaining the purpose and scope of each production change block and its focused regression coverage.
Signed-off-by: Xiwen Yu <13230610+VALLIS-NERIA@users.noreply.github.com>
Signed-off-by: Xiwen Yu <13230610+VALLIS-NERIA@users.noreply.github.com>
Signed-off-by: Xiwen Yu <13230610+VALLIS-NERIA@users.noreply.github.com>
Signed-off-by: Xiwen Yu <13230610+VALLIS-NERIA@users.noreply.github.com>
Signed-off-by: Xiwen Yu <13230610+VALLIS-NERIA@users.noreply.github.com>
Signed-off-by: Xiwen Yu <13230610+VALLIS-NERIA@users.noreply.github.com>
Signed-off-by: Xiwen Yu <13230610+VALLIS-NERIA@users.noreply.github.com>
7014727 to
5a5b53d
Compare
|
/bot run |
|
PR_Github #59667 [ run ] triggered by Bot. Commit: |
|
PR_Github #59667 [ run ] completed with state
|
Signed-off-by: Xiwen Yu <13230610+VALLIS-NERIA@users.noreply.github.com>
|
Updated the forced-chunk semantics in 76d8903, with the public-API-file cleanup in 31eed67:
Validation:
The PR description has also been updated to reflect that requests without a pending snapshot point consume the remaining context unless scheduling limits require truncation. |
Signed-off-by: Xiwen Yu <13230610+VALLIS-NERIA@users.noreply.github.com>
|
/bot run |
|
PR_Github #60171 [ run ] triggered by Bot. Commit: |
|
PR_Github #60171 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #60226 [ run ] triggered by Bot. Commit: |
|
PR_Github #60226 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #60298 [ run ] triggered by Bot. Commit: |
|
PR_Github #60298 [ run ] completed with state
|
…ent) Signed-off-by: Xiwen Yu <13230610+VALLIS-NERIA@users.noreply.github.com>
|
/bot run --disable-fail-fast |
|
PR_Github #60370 [ run ] triggered by Bot. Commit: |
|
PR_Github #60370 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #60407 [ run ] triggered by Bot. Commit: |
|
PR_Github #60407 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #60431 [ run ] triggered by Bot. Commit: |
|
PR_Github #60431 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #60504 [ run ] triggered by Bot. Commit: |
|
PR_Github #60504 [ run ] completed with state |
Summary by CodeRabbit
New Features
Bug Fixes
Description
This PR has two goals:
expect_snapshot_pointsas the manager-to-scheduler contract and move the existing C++ Mamba interval-reuse chunking onto that contract.Snapshot-aware context chunking
expect_snapshot_pointson the C++ request object and expose it through nanobind, so the C++ and Python schedulers share the same per-request field.CppMambaHybridCacheManagerpublish regularstates_snapshot_intervalboundaries before scheduling when block reuse is enabled. Prompt end remains the implicit final boundary.MicroBatchScheduler, PythonPyMicroBatchScheduler, andKVCacheV2Schedulerhonor these absolute boundaries underFORCE_CHUNK.KV-cache fixes
max_tokens_in_bufferonly after the effectivetokens_per_blockis known, including the FlashMLA override, and round it up to a block boundary.RankInfo, because layer 0 may be a linear-attention layer with no KV heads.MixedMambaHybridCacheManagerwith a non-Python transceiver runtime, since its separately managed attention-KV and Mamba-state pools require the Python routing path.This PR does not add the V2 Mamba cache manager, save-last reuse, or V2 Mamba disaggregated transfer.
Test Coverage
ForceChunkTest.*: 15 passedTestForceChunkPolicy: 14 passedRankInfo, and runtime-guard tests: 13 passedPR Checklist